﻿using System.Collections.ObjectModel;
using Prism.Mvvm;

namespace ChatClient.Models
{
    public class Participant : BindableBase
    {
        public string? Name { get; set; }
        public byte[]? Photo { get; set; }

        #region 依赖属性

        public ObservableCollection<ChatMessage> Chatter { get; set; }

        public bool IsLoggedIn
        {
            get => _isLoggedIn;
            set => SetProperty(ref _isLoggedIn, value);
        }

        public bool IsTyping
        {
            get => _isTyping;
            set => SetProperty(ref _isTyping, value);
        }

        public bool HasSentNewMessage
        {
            get => _hasSentNewMessage;
            set => SetProperty(ref _hasSentNewMessage, value);
        }

        private bool _isLoggedIn = true;
        private bool _isTyping;
        private bool _hasSentNewMessage;

        #endregion

        public Participant()
        {
            Chatter = new ObservableCollection<ChatMessage>();
        }
    }
}